//
//  ZDViewController.m
//  ZDSweepCodeSDK
//
//  Created by yuanchao__2106@163.com on 07/30/2021.
//  Copyright (c) 2021 yuanchao__2106@163.com. All rights reserved.
//

#import "ZDViewController.h"
#import <ZDSweepCodeSDK/XASweepCodeManager.h>
#import <Masonry/Masonry.h>
@interface ZDViewController ()

@end

@implementation ZDViewController

- (void)viewDidLoad
{
    [super viewDidLoad];
	// Do any additional setup after loading the view, typically from a nib.
    UIButton *btn = [UIButton buttonWithType:UIButtonTypeSystem];
    btn.backgroundColor = [UIColor orangeColor];
    [btn addTarget:self action:@selector(tosweepVc) forControlEvents:UIControlEventTouchUpInside];
    [self.view addSubview:btn];
    
    [btn mas_makeConstraints:^(MASConstraintMaker *make) {
        make.center.equalTo(self.view);
        make.size.mas_equalTo(CGSizeMake(100, 100));
    }];
}

- (void)tosweepVc
{
    [XASweepCodeManager goSweepCode:self keyWindowRootVC:[UIApplication sharedApplication].delegate.window.rootViewController];
}

- (void)didReceiveMemoryWarning
{
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

@end
